#ifndef __COMMAND_HANDLER_H
#define __COMMAND_HANDLER_H

#include "bsp_system.h"
//串口指令运行状态
typedef enum{
	RUN_STATE_IDLE = 0,						//空指令
	RUN_STATE_CHECK = 1,					//系统自检指令
	RUN_STATE_RTC_SET = 2,				//时间设置指令
	RUN_STATE_RTC_GET= 3,					//时间获取指令
	RUN_STATE_CONF_READ = 4,			//配置读取指令
	RUN_STATE_CONF_SET_R = 5,			//变比设置指令
	RUN_STATE_CONF_SET_L = 6,			//阈值设置指令
	RUN_STATE_CONF_SAVE = 7,			//参数存储,变比存入FLASH指令
	RUN_STATE_CONF_FLASH_R = 8,		//读取flash指令
	RUN_STATE_SAMPLE_START = 9,		//采样启动指令
	RUN_STATE_SAMPLE_STOP = 10,		//采样停止指令
	RUN_STATE_DAT_HIDE = 11,			//数据加密指令
	RUN_STATE_DAT_UNHIDE = 12			//数据解加密指令
}system_uart_cmd_state;

void system_uart_cmd_run(char *input);
void uart_task(void);
#endif
